/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.hk.shop.entity.shop;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;
import com.thinkgem.jeesite.modules.hk.shop.entity.product.HkShopProduct;
import com.thinkgem.jeesite.modules.hk.sys.entity.user.HkUser;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 优惠券Entity
 *
 * @author 李欣荣
 * @version 2018-09-27
 */
public class HkShopCoupon extends DataEntity<HkShopCoupon> {

    private static final long serialVersionUID = 1L;
    private String title;        // 标题
    private Date beginTime;        // 开始时间
    private String stocks;        // 库存
    private Date endTime;        // 结束时间
    private String state;        // 状态
    private HkShopProduct product;        // 商品id
    private String discount;        // 折扣
    private String integral;  //乐币 业务字段

    private String bisId; //业务字段

    public String getBisId() {
        return bisId;
    }

    public void setBisId(String bisId) {
        this.bisId = bisId;
    }

    public HkShopCoupon() {
        super();
    }

    public HkShopCoupon(String id) {
        super(id);
    }

    @ExcelField(title = "优惠券名称",align = 2)
    @Length(min = 0, max = 100, message = "标题长度必须介于 0 和 100 之间")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @ExcelField(title = "券生效时间" ,align = 2,sort = 10)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    @ExcelField(title = "库存" ,align = 2,sort = 10)
    @Length(min = 0, max = 11, message = "库存长度必须介于 0 和 11 之间")
    public String getStocks() {
        return stocks;
    }

    public void setStocks(String stocks) {
        this.stocks = stocks;
    }

    @ExcelField(title = "券失效时间" ,align = 2,sort = 10)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @ExcelField(title = "券状态",align = 2,sort = 2,dictType = "coupon_state")
    @Length(min = 0, max = 1, message = "状态长度必须介于 0 和 1 之间")
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public HkShopProduct getProduct() {
        return product;
    }

    public void setProduct(HkShopProduct product) {
        this.product = product;
    }

    @ExcelField(title = "折扣",align = 2,sort = 10)
    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }


    public String getIntegral() {
        return integral;
    }

    public void setIntegral(String integral) {
        this.integral = integral;
    }
}